from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
# WebDriverWait(driver,15,0.5).until(EC.presence_of_element_located((By.LINK_TEXT,"登录")))
WebDriverWait(driver,15,0.5).until(EC.visibility_of_element_located((By.LINK_TEXT,"登录")))
print(driver.find_element_by_link_text("登录").get_attribute("href"))
